package br.sales.persistence;

import java.util.List;

import br.sales.entity.DynamicQuery;
import br.sales.persistence.exception.DBContainerNotInitializedException;


@SuppressWarnings("rawtypes")
public interface IPersistence {

	public Object save(Object o) throws DBContainerNotInitializedException;
	public Object update(Object o) throws DBContainerNotInitializedException;
	public Object retrieve(Object primaryKey, Class clazz) throws DBContainerNotInitializedException;
	public Object retrieveByExample(Object o) throws DBContainerNotInitializedException;
	public List retrieveAll(Class clazz) throws DBContainerNotInitializedException;
	public boolean delete(Object object) throws DBContainerNotInitializedException;
	public void commit() throws DBContainerNotInitializedException;
	public void rollback() throws DBContainerNotInitializedException;
	public void close() throws DBContainerNotInitializedException;
	public Object getContainer();
	public List createNativeQuery(List<DynamicQuery> dqs , Class clazz) throws DBContainerNotInitializedException;
	public long getObjectId(Object o);
}
